Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log evaluation history in new tables #3659

Merged
merged 3 commits into from
Jun 19, 2024
Merged

Log evaluation history in new tables #3659

merged 3 commits into from
Jun 19, 2024

Conversation

dmjb
Copy link
Contributor

@dmjb dmjb commented Jun 19, 2024

This adds an interface and implementation for logging rule evaluation statuses. The logic flow is described in the design doc. Note that this does not wire in the logic into the engine yet, nor does it track remediations/alerts. These will be added in future PRs.

Relates to: #3556

Summary

Provide a brief overview of the changes and the issue being addressed.
Explain the rationale and any background necessary for understanding the changes.
List dependencies required by this change, if any.

Fixes #(related issue)

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@dmjb dmjb requested a review from a team as a code owner June 19, 2024 08:37
@@ -191,7 +191,7 @@ func (e *Executor) evalEntityEvent(ctx context.Context, inf *entities.EntityInfo
// Let's evaluate all the rules for this profile
err = profiles.TraverseRules(relevant, func(rule *pb.Profile_Rule) error {
// Get the engine evaluator for this rule type
evalParams, ruleEngine, actions, err := e.getEvaluator(
evalParams, ruleEngine, actionEngine, err := e.getEvaluator(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small changes in this file:

  1. Rename actions to actionEngine to avoid shadowing an import name
  2. Move SetActionsErr directly under the call to run actions.

@coveralls
Copy link

Coverage Status

coverage: 53.557% (+0.2%) from 53.318%
when pulling 6e32039 on history-service
into 7541461 on main.

@coveralls
Copy link

Coverage Status

coverage: 53.572% (+0.3%) from 53.318%
when pulling 6e32039 on history-service
into 7541461 on main.

JAORMX
JAORMX previously approved these changes Jun 19, 2024
@dmjb dmjb force-pushed the history-service branch 2 times, most recently from 66b296b to bd354c2 Compare June 19, 2024 15:04
dmjb added 3 commits June 19, 2024 16:08
This adds an interface and implementation for logging rule evaluation
statuses. The logic flow is described in the design doc. Note that this
does not wire in the logic into the engine yet, nor does it track
remediations/alerts. These will be added in future PRs.

Relates to: #3556
@dmjb dmjb merged commit 6ff17de into main Jun 19, 2024
21 checks passed
@dmjb dmjb deleted the history-service branch June 19, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants